#ifndef CONFIGVIEW_H
#define CONFIGVIEW_H

#include <common/baseeditor.h>
#include <element/userprofile.h>
#include "m_fhs.h"

namespace Ui {
class ConfigView;
}

class ConfigView : public BaseEditor
{
    Q_OBJECT

public:
    explicit ConfigView(QWidget *parent = 0);
    ~ConfigView();

    void updateView();
    void generateMenu();
    void loadFile(const QString &fileName);

private slots:
    void on_userView_doubleClicked(const QModelIndex &index);
    void on_systemView_doubleClicked(const QModelIndex &index);
    void on_btn_save_clicked();

private:
    Ui::ConfigView *ui;

    QString homeLocation;
    QString _fileName;
    QSqlTableModel *userModel;
    QSqlTableModel *systemModel;
};

#endif // CONFIGVIEW_H
